package MainDemo;/**
 * @author XuXiaoK
 * @create 2020-01-21 19:01
 */

import com.netflix.config.ConfigurationManager;
import command.MyCommand;

/**
 * @Author XiaoKe
 * @Date 2020/1/21 19:01
 * @Description TODO
 */
public class ThreadIso {
    public static void main(String[] args) throws InterruptedException {
        // 断路器被强制打开
        ConfigurationManager.getConfigInstance().setProperty(
                "hystrix.threadpool.default.coreSize", 3);
        for (int i = 0; i < 6; i++) {
            MyCommand myCommand = new MyCommand(i);
            myCommand.queue();
        }
        Thread.sleep(5000);
    }
}
